package com.util;


import com.bean.dto.Dto;

/**
 * Dto工具
 */
public class DtoUtil {

    public static Dto returnSuccess(){
        return new Dto("true", "200");
    }

    public static Dto returnSuccess(String msg){
        return new Dto("true", "0",msg,null );
    }

    public static Dto returnSuccess(String msg,Object data){
        return new Dto("true", "0",msg, data);
    }
    public static Dto returnSuccess(String msg,Object data,String code){
        return new Dto("true", code,msg, data);
    }

    public static Dto returnError(String msg){
        return new Dto("false", msg,"" );
    }

    public static Dto returnError(String code,String msg, Object data){
        return new Dto("false", code, msg ,data);
    }
}
